home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2000 February / Macworld (2000-02).dmg / Shareware World / Utilities / Data & Time / BlackWatch 1.5.1 / For programmers / TestGestalt source / TestGestalt.h < prev    next >
Encoding:
Text File  |  1998-11-14  |  1.8 KB  |  75 lines  |  [TEXT/CWIE]

  1. // TestGestalt.h
  2.  
  3. #pragma once
  4. #include <MixedMode.h>
  5. #include <Gestalt.h>
  6. #include "AfterDarkGestalt.h"
  7.  
  8. // BlackWatch defines an additional SaverCommand to put the screen saver into
  9. // "deep sleep" mode, in which it can only be awakened by a gestaltSaverWakeUp
  10. // or gestaltSaverOff command.
  11.  
  12. #define    gestaltSaverDeepSleep    (gestaltSaverSleep + 128)
  13.  
  14. // After Dark's SDK didn't use universal procedure pointers,
  15. // so define them here.
  16.  
  17. #if GENERATINGCFM
  18. typedef UniversalProcPtr SaverControlUPP;
  19. #else
  20. typedef SaverControlProcPtr SaverControlUPP;
  21. #endif
  22.  
  23. enum {
  24.     uppSaverControlProcInfo = kPascalStackBased
  25.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  26.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SaverCommand)))
  27. };
  28.  
  29. #if GENERATINGCFM
  30. #define NewSaverControlProc(userRoutine)        \
  31.         (SaverControlUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSaverControlProcInfo, GetCurrentArchitecture())
  32. #else
  33. #define NewSaverControlProc(userRoutine)        \
  34.         ((SaverControlUPP) (userRoutine))
  35. #endif
  36.  
  37. #if GENERATINGCFM
  38. #define CallSaverControlProc(userRoutine, command)        \
  39.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSaverControlProcInfo, (command))
  40. #else
  41. #define CallSaverControlProc(userRoutine, command)        \
  42.         (*(userRoutine))((command))
  43. #endif
  44.  
  45. //------------------------------------------------------------------------
  46. //    constant definitions
  47.  
  48. /* menu bar */
  49. #define MBAR_ID        256
  50.  
  51. /* menus */
  52. #define APPLE_ID    256
  53. #define FILE_ID        257
  54. #define EDIT_ID        258
  55.  
  56. /* menu items */
  57. #define ABOUT_ITEM    1
  58. #define QUIT_ITEM    1
  59. #define UNDO_ITEM    1
  60. #define CUT_ITEM    3
  61. #define COPY_ITEM    4
  62. #define PASTE_ITEM    5
  63. #define CLEAR_ITEM    6
  64.  
  65. /* windows, dialogs, alerts */
  66. #define TEST_DLOG    128
  67.  
  68. /* dialog items */
  69. #define QUIT_BTN    1
  70. #define SLEEP_BTN    2
  71. #define DSLEEP_BTN    3
  72. #define    OFF_BTN        4
  73. #define    ON_BTN        5
  74.  
  75.